package cn.opopopo.design_pattern_learn.行为型.责任链;

// 4. 具体处理者 - 部门经理
class DepartmentManager extends Approver {
    @Override
    public void processRequest(LeaveRequest request) {
        if (request.getDays() <= 7) {
            System.out.println("DepartmentManager 批准: " + request);
        } else if (nextApprover != null) {
            System.out.println("DepartmentManager 无法处理，转交...");
            nextApprover.processRequest(request);
        }
    }
}